package com.stylefeng.guns.modular.platform.model;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.stylefeng.guns.common.constant.Enum.UserInfoLevelEnum;
import com.stylefeng.guns.common.constant.Enum.UserInfoStatusEnum;
import com.stylefeng.guns.common.constant.Enum.UserInfoTypeEnum;

/**
 * <p>
 * 平台用户信息表
 * </p>
 *
 * @author stylefeng123
 * @since 2018-07-13
 */
@TableName("platform_user_info")
public class UserInfo extends Model<UserInfo> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Integer id;
    /**
     * 手机号码
     */
    private String mobile;
    /**
     * 密码
     */
    private String password;
    /**
     * 用户类型（1：广告主 2：流量主）
     */
    private int type;
    /**
     * 用户等级(0：普通用户1：待定2：待定
     */
    private int level;
    /**
     * 状态(0:可用1不可用)
     */
    private Integer status;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;
    /**
     * 备注
     */
    private String remark;
    @TableField(exist = false)
    private String typeName;
    @TableField(exist = false)
    private String levelName;
    @TableField(exist = false)
    private String statusName;
    
    /**
     * 金币
     */
    @TableField("gold")
    private Long gold;

    public Long getGold() {
		return gold;
	}

	public void setGold(Long gold) {
		this.gold = gold;
	}

	public String getTypeName() {
		return UserInfoTypeEnum.getDesc(this.type);
	}

	public void setTypeName(String typeName) {
		this.typeName = UserInfoTypeEnum.getDesc(this.type);
	}

	public String getLevelName() {
		return UserInfoLevelEnum.getDesc(this.level);
	}

	public void setLevelName(String levelName) {
		this.levelName = UserInfoLevelEnum.getDesc(this.level);
	}

	public String getStatusName() {
		return UserInfoStatusEnum.getDesc(this.status);
	}

	public void setStatusName(String statusName) {
		this.statusName = UserInfoStatusEnum.getDesc(this.status);;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Override
    protected Serializable pkVal() {
        return this.id;
    }

}
